Skip to content

Add JS DOM utils to Scaladoc-js #14595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

pikinier20
Copy link
Contributor

No description provided.

@pikinier20 pikinier20 force-pushed the scaladoc/js-html-utils branch from 1faf597 to 39e3fcf Compare March 2, 2022 10:48
val testId = Attr("data-test-id")
val alt = Attr("alt")
val value = Attr("value")
val onclick=Attr("onclick")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also: i'd use onClick

val b = Tag[domhtml.Element]("b")
val i = Tag[domhtml.Element]("i")

val cls = Attr("class")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class, we do not code in C++ to count every character we type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class is a keyword and I didn't want to type:

`class`

in every tag

@@ -178,22 +155,16 @@ class CodeSnippets:
case btn: html.Element => btn.parentElement.style = "display:none;"
case _ =>
}
div.style = "display:none;"
bdiv.style = "display:none;"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldnt be this event listerner block inlined in exitButton using tap?

import org.scalajs.dom._
import org.scalajs.dom.ext._
import org.scalajs.dom.html.Input
import scala.scalajs.js.timers._
import scala.concurrent.duration._
import scala.concurrent.duration.{span => dspan, _}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dspan seems unused. Can we just import things we need or import span => _?

@pikinier20 pikinier20 merged commit 99c2b96 into scala:main Mar 9, 2022
@pikinier20 pikinier20 deleted the scaladoc/js-html-utils branch March 9, 2022 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants